home *** CD-ROM | disk | FTP | other *** search
/ Atlas of Florida / Atlas of Florida.iso / Movies / 1.0 Introduction / 1.0 Introduction / 00243_Script_243 < prev    next >
Text File  |  1994-08-23  |  12KB  |  305 lines

  1. -- Volume (Vol) return text popUp menu
  2.  
  3. on AlphabetMenuVol    --  a pop up menu returning item text
  4.   global  PopAlphaVol
  5.   
  6.   --  dispose of any previous instances, if any
  7.   if objectP( PopAlphaVol ) then PopAlphaVol( mDispose )
  8.   set menuListVol = the text of cast "VolMenList1"
  9.   --  Be sure to set parameter itemNum for PopNum or PopText to zero.
  10.   set PopAlphaVol = PopMenu(mNew,menuListVol, 216)
  11.   
  12.   if not objectP( PopAlphaVol ) then 
  13.     alert "PopMenu Object not made: " & string( PopAlphaVol )
  14.   end if
  15.   
  16.   --  to set automatic remembering of last item selected
  17.   PopAlphaVol(mSmart, 1 )
  18.   
  19.   --  PopMenu uses screen co÷rdinates, which must be changed
  20.   --  to window co÷rdinates with the StageLeft & stageTop functions
  21.   set sH = the left of sprite 12 + the stageLeft + 1
  22.   set sV = the top of sprite 12 + the stageTop + 1
  23.   
  24.   set result = PopAlphaVol(mPopText, sH, sV, 0)
  25.   if string( result ) = "" then exit
  26.   else set the text of cast "VolMen1" to "   " & string( result )
  27.   
  28.   MakeConversionVol
  29.   
  30.   -- dispose of this menu
  31.   if objectP( PopAlphaVol ) then PopAlphaVol( mDispose )
  32.   
  33. on AlphabetMenu2Vol    --  a pop up menu returning item text
  34.   global  PopAlpha2Vol
  35.   --  dispose of any previous instances, if any
  36.   if objectP( PopAlpha2Vol ) then PopAlpha2Vol( mDispose )
  37.   set menuListVol = the text of cast "VolMenList2"
  38.   --  Be sure to set parameter itemNum for PopNum or PopText to zero.
  39.   set PopAlpha2Vol = PopMenu(mNew,menuListVol, 216)
  40.   
  41.   if not objectP( PopAlpha2Vol ) then 
  42.     alert "PopMenu Object not made: " & string( PopAlpha2Vol )
  43.   end if
  44.   
  45.   --  to set automatic remembering of last item selected
  46.   PopAlpha2Vol(mSmart, 1 )
  47.   
  48.   --  PopMenu uses screen co÷rdinates, which must be changed
  49.   --  to window co÷rdinates with the StageLeft & stageTop functions
  50.   set sH = the left of sprite 15 + the stageLeft + 1
  51.   set sV = the top of sprite 15 + the stageTop + 1
  52.   
  53.   set result = PopAlpha2Vol(mPopText, sH, sV, 0)
  54.   if string( result ) = "" then exit
  55.   else set the text of cast "VolMen2" to "   " & string( result )
  56.   
  57.   MakeConversionVol
  58.   
  59.   -- dispose of this menu
  60.   if objectP( PopAlpha2Vol ) then PopAlpha2Vol( mDispose )
  61.   
  62.   
  63. on MakeConversionVol -- does conversion based on the menus and the entered value  
  64.   showChannel 14
  65.   -- hide other answers
  66.   hideChannel 8
  67.   hideChannel 20
  68.   
  69.   put string(the text of cast "VolMen1") into menu1Vol
  70.   put string(the text of cast "VolMen2") into menu2Vol
  71.   put value(the text of cast "VolValue") into cValueVol -- entered by user
  72.   
  73.   put "?" into field "AnswerVol"
  74.   
  75.   if menu1Vol =  "     oz" then 
  76.     if menu2Vol =  "     oz" then 
  77.       put cValueVol into field "AnswerVol"
  78.       put cValueVol into field "AnswerString"
  79.     end if
  80.     if menu2Vol =  "     pt" then 
  81.       put ( cValueVol / 16.0) into field "AnswerVol"
  82.       put cValueVol & " / 16" into field "AnswerString"
  83.     end if
  84.     if menu2Vol =  "     qt" then 
  85.       put ( cValueVol / 64.0 ) into field "AnswerVol"
  86.       put cValueVol & " / 64" into field "AnswerString"
  87.     end if
  88.     if menu2Vol =  "     gal    " then
  89.       put ( (cValueVol / 64.0 ) / 4.0 ) into field "AnswerVol"
  90.       put "( " & cValueVol & " / 64 ) / 4" into field "AnswerString"
  91.     end if
  92.     if menu2Vol =  "     cl" then
  93.       put (cValueVol * 0.0296 ) * 100.0 into Field "AnswerVol"
  94.       put "( " & cValueVol & " * .0296 ) * 100" into field "AnswerString"
  95.     end if
  96.     if menu2Vol =  "     l" then
  97.       put (cValueVol * 0.0296 )  into field "AnswerVol"
  98.       put cValueVol & " * .0296" into field "AnswerString"
  99.     end if
  100.     if menu2Vol =  "     kl" then
  101.       put  ( (cValueVol * 0.0296 ) / 1000.0 ) into field "AnswerVol"
  102.       put "( " & cValueVol & " * .0296 ) / 1,000" into field "AnswerString"
  103.     end if
  104.   end if
  105.   
  106.   
  107.   if menu1Vol =  "     pt" then 
  108.     if menu2Vol =  "     oz" then
  109.       put cValueVol * 16.0 into field "AnswerVol"
  110.       put cValueVol & " * 16" into field "AnswerString"
  111.     end if
  112.     if menu2Vol =  "     pt" then
  113.       put cValueVol into field "AnswerVol"
  114.       put cValueVol into field "AnswerString"
  115.     end if
  116.     if menu2Vol =  "     qt" then
  117.       put ( cValueVol / 2.0 ) into field "AnswerVol"
  118.       put cValueVol & " / 2" into field "AnswerString"
  119.     end if
  120.     if menu2Vol =  "     gal    " then
  121.       put ( (cValueVol / 2.0 ) / 4.0 ) into field "AnswerVol"
  122.       put "( " & cValueVol & " / 2 ) / 4" into field "AnswerString"
  123.     end if
  124.     if menu2Vol =  "     cl" then
  125.       put (cValueVol * 0.4732 ) * 100.0 into Field "AnswerVol"
  126.       put "( " & cValueVol & " * .4732 ) * 100" into field "AnswerString"
  127.     end if
  128.     if menu2Vol =  "     l" then
  129.       put (cValueVol * 0.4732 )  into field "AnswerVol"
  130.       put cValueVol & " * .4732" into field "AnswerString"
  131.     end if
  132.     if menu2Vol =  "     kl" then
  133.       put  ( (cValueVol * 0.4732 ) / 1000.0 ) into field "AnswerVol"
  134.       put "( " & cValueVol & " * .4732 ) / 1,000" into field "AnswerString"
  135.     end if
  136.   end if
  137.   
  138.   if menu1Vol =  "     qt" then 
  139.     if menu2Vol =  "     oz" then 
  140.       put cValueVol * 32.0 into field "AnswerVol"
  141.       put cValueVol & " * 32" into field "AnswerString"
  142.     end if
  143.     if menu2Vol =  "     pt" then
  144.       put cValueVol * 2.0 into field "AnswerVol"
  145.       put cValueVol & " * 2" into field "AnswerString"
  146.     end if
  147.     if menu2Vol =  "     qt" then
  148.       put ( cValueVol ) into field "AnswerVol"
  149.       put cValueVol into field "AnswerString"
  150.     end if
  151.     if menu2Vol =  "     gal    " then
  152.       put ( cValueVol / 4.0 ) into field "AnswerVol"
  153.       put cValueVol & " / 4" into field "AnswerString"
  154.     end if
  155.     if menu2Vol =  "     cl" then
  156.       put (cValueVol * 0.9464 ) * 100.0 into Field "AnswerVol"
  157.       put "( " & cValueVol & " * .9464 ) * 100" into field "AnswerString"
  158.     end if
  159.     if menu2Vol =  "     l" then
  160.       put (cValueVol * 0.9464 )  into field "AnswerVol"
  161.       put cValueVol & " * .9464" into field "AnswerString"
  162.     end if
  163.     if menu2Vol =  "     kl" then
  164.       put  ( (cValueVol * 0.9464 ) / 1000.0 ) into field "AnswerVol"
  165.       put "( " & cValueVol & " * .9464 ) / 1,000" into field "AnswerString"
  166.     end if
  167.   end if
  168.   
  169.   if menu1Vol =  "     gal    " then 
  170.     if menu2Vol =  "     oz" then
  171.       put cValueVol * 32.0 * 4.0 into field "AnswerVol"
  172.       put "( " & cValueVol & " * 32 ) * 4" into field "AnswerString"
  173.     end if
  174.     if menu2Vol =  "     pt" then 
  175.       put cValueVol * 2.0 * 4.0 into field "AnswerVol"
  176.       put "( " & cValueVol & " * 2 ) * 4" into field "AnswerString"
  177.     end if
  178.     if menu2Vol =  "     qt" then
  179.       put ( cValueVol * 4.0 ) into field "AnswerVol"
  180.       put cValueVol & " * 4" into field "AnswerString"
  181.     end if
  182.     if menu2Vol =  "     gal    " then
  183.       put cValueVol into field "AnswerVol"
  184.       put cValueVol into field "AnswerString"
  185.     end if
  186.     if menu2Vol =  "     cl" then
  187.       put (cValueVol * 3.7854 ) * 100.0 into Field "AnswerVol"
  188.       put "( " & cValueVol & " * 3.7854 ) * 100" into field "AnswerString"
  189.     end if
  190.     if menu2Vol =  "     l" then
  191.       put (cValueVol * 3.7854 )  into field "AnswerVol"
  192.       put cValueVol & " * 3.7854" into field "AnswerString"
  193.     end if
  194.     if menu2Vol =  "     kl" then
  195.       put  ( (cValueVol * 3.7854 ) / 1000.0 ) into field "AnswerVol"
  196.       put "( " & cValueVol & " * 3.7854 ) / 1,000" into field "AnswerString"
  197.     end if
  198.   end if
  199.   
  200.   if menu1Vol =  "     cl" then 
  201.     if menu2Vol =  "     oz" then
  202.       put (cValueVol * 0.338) into field "AnswerVol"
  203.       put cValueVol & " * .338" into field "AnswerString"
  204.     end if
  205.     if menu2Vol =  "     pt" then
  206.       put (cValueVol * 0.338) / 16.0 into field "AnswerVol"
  207.       put "( " & cValueVol & " * .338 ) / 16" into field "AnswerString"
  208.     end if
  209.     if menu2Vol =  "     qt" then
  210.       put (cValueVol * 0.338) / 16.0 / 2.0 into field "AnswerVol"
  211.       put "( ( " & cValueVol & " * .338 ) / 16 ) / 2" into field "AnswerString"
  212.     end if
  213.     if menu2Vol =  "     gal    " then
  214.       put (cValueVol * 0.338) / 16.